package com.example.tyz1201.myaccount.Activity.Activity.Model;

/**
 * Created by tyz1201 on 2016/4/8.
 */
public class AssumeModel {
    private float todoMoney;
    private String tips, choosedName;
    private long createTime;
    private int choosedAssumeTypeId;

    public AssumeModel(String tips, float todoMoney, long createTime, String choosedName, int choosedAssumeTypeId) {
        this.todoMoney = todoMoney;
        this.tips = tips;
        this.createTime = createTime;
        this.choosedName = choosedName;
        this.choosedAssumeTypeId = choosedAssumeTypeId;
    }

    public float getTodoMoney() {
        return todoMoney;
    }

    public void setTodoMoney(float todoMoney) {
        this.todoMoney = todoMoney;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getChoosedName() {
        return choosedName;
    }

    public void setChoosedName(String choosedName) {
        this.choosedName = choosedName;
    }

    public String toString() {
        return tips + "/" + todoMoney + "/" + createTime + "/" + choosedName + "/" + choosedAssumeTypeId;
    }

    public int getChoosedAssumeTypeId() {
        return choosedAssumeTypeId;
    }

    public void setChoosedAssumeTypeId(int choosedAssumeTypeId) {
        this.choosedAssumeTypeId = choosedAssumeTypeId;
    }

    public static AssumeModel backToAssumeModel(String str) {
        float todoMoney;
        String tips, choosedName;
        long creatTime;
        int choosedAssumeTypeId;

        String[] strs = str.split("/");

        tips = strs[0];
        todoMoney = Float.parseFloat(strs[1]);
        creatTime = Long.parseLong(strs[2]);
        choosedName = strs[3];
        choosedAssumeTypeId = Integer.parseInt(strs[4]);

        AssumeModel assumeModel = new AssumeModel(tips, todoMoney, creatTime, choosedName, choosedAssumeTypeId);
        return assumeModel;

    }

}
